<!DOCTYPE html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js"> <!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>神算小天才</title>
    <meta name="description" content="小学数学口算速算心算">
    <meta name="viewport" content="width=device-width">

    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
    <!-- build:remove -->
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="stylesheet" href="css/button.css">
    <link rel="stylesheet" href="css/bootstrap-select.min.css">
    <!-- /build -->
    <link rel="stylesheet" type="text/css" href="./css/application.css" />
    <!--百度统计-->
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "//hm.baidu.com/hm.js?d0534e5376bfa027e914977f50fc69de";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>
<body id="quanping">
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade
    your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to
    improve your experience.</p>
<![endif]-->

<!-- toast 页面 -->
<div id="toast_container">
    <div id="toast_color_bar"></div>
    <div id="toast_main"></div>
</div>

<!-- 第一面屏幕，欢迎界面 -->
<div id="screen1">
    <div align="center" id="screen1_cover">
        <div class="panel panel-default" id="panel1">
            <div class="panel-body">
                <h1><font color="black">神算小天才(+◡+)</font></h1>

                <h2 id="welcome">小朋友们准备好开始练习速算了吗？</h2>
                <a class="button button-action button-rounded button-raised button-primary" id="enter1"
                   style="width: 280px;">直接进入</a>
                <div style="margin-top: 20px">
                    <a class="button button-action button-border button-rounded button-primary"
                       data-toggle="modal" data-target="#LoginModal">登陆</a>
                    <a class="button button-action button-border button-rounded button-primary"
                       data-toggle="modal" data-target="#registerModal" style="margin-left:42px ;">注册</a>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 第二面屏幕，主界面 -->
<div id="screen2">
    <nav class="navbar navbar-default navbar-fixed-top">
        <a class="navbar-brand">欢迎<span id="user"></span>使用本网站</a>

        <div class="container">
            <ul class="nav nav-tabs" id="navbar1">
                <li role="presentation"><a id="index_btn">退出</a></li>
                <li role="presentation"><a id="fullscreen_btn">进入全屏</a></li>
                <li role="presentation"><a id="about_btn" onclick="about()">关于</a></li>
                <li role="presentation"><a id="identity" onclick="loadList()" data-toggle="modal"
                                           data-target="#recordModal">做题记录</a></li>
            </ul>
        </div>
    </nav>
    <!--record Modal -->
    <div class="modal fade" id="recordModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="recordModalLabel">做题记录</h4>
                </div>
                <div class="modal-body" id="recordList">

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" onclick="paint()">画图分析</button>
                    <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
    <div id="screen2_cover">
        <div class="container-fluid">
            <div align="center">
                <form name="frm" id="functionControl">
                    <div class="row" style="margin-top: 50px">
                        <div class="col-md-3"></div>
                        <div class="col-md-2" style="background-color: white;opacity:0.9;height: 72px;padding-top: 20px">
                            <select class="selectpicker"data-width="100px" id="select12" name="s1"
                                    onChange="redirec(document.frm.s1.options.selectedIndex)">
                                <option selected value="2" id="timeModel">急速模式</option>
                                <option value="1" id="normalModel">普通模式</option>
                            </select>
                        </div>
                        <div class="col-md-2" style="background-color: white;opacity:0.9;height: 72px;padding-top: 20px">
                            <select name="s2" class="selectpicker"data-width="100px" id="select13">
                                <option value="m1" selected>正常</option>
                                <option value="m2">慢速</option>
                                <option value="m3">超速</option>
                            </select>
                        </div>
                        <div class="col-md-2" style="background-color: white;opacity:0.9;height: 72px;padding-top: 20px">
                            <select name="s3" class="selectpicker" data-width="130px" id="select14">
                                <option value="level1" selected>小学一年级</option>
                                <option value="level2">小学二年级</option>
                                <option value="level3">小学三年级</option>
                                <option value="level4">小学四年级</option>
                            </select>
                        </div>
                    </div>
                </form>
            </div>

            <!--普通模式-->
            <div id="normal_Model">
                <div class="panel panel-primary" id="commonmode">
                    <div class="panel-heading">普通模式</div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-1"></div>
                            <div class="col-md-3" id="number01">?</div>
                            <div class="col-md-1" id="fuhao0">+</div>
                            <div class="col-md-3" id="number02">?</div>
                            <div class="col-md-1" id="equal0">=</div>
                            <div class="col-md-3 normal_input">
                                <input type="text" id="ipt1" size="5">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-1"></div>
                            <div class="col-md-3" id="number11">?</div>
                            <div class="col-md-1" id="fuhao1">+</div>
                            <div class="col-md-3" id="number12">?</div>
                            <div class="col-md-1" id="equal1">=</div>
                            <div class="col-md-3 normal_input">
                                <input type="text" id="ipt2" size="5">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-1"></div>
                            <div class="col-md-3" id="number21">?</div>
                            <div class="col-md-1" id="fuhao2">+</div>
                            <div class="col-md-3" id="number22">?</div>
                            <div class="col-md-1" id="equal2">=</div>
                            <div class="col-md-3 normal_input">
                                <input type="text" id="ipt3" size="5">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-1"></div>
                            <div class="col-md-3" id="number31">?</div>
                            <div class="col-md-1" id="fuhao3">+</div>
                            <div class="col-md-3" id="number32">?</div>
                            <div class="col-md-1" id="equal3">=</div>
                            <div class="col-md-3 normal_input">
                                <input type="text" id="ipt4" size="5">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-1"></div>
                            <div class="col-md-3" id="number41">?</div>
                            <div class="col-md-1" id="fuhao4">+</div>
                            <div class="col-md-3" id="number42">?</div>
                            <div class="col-md-1" id="equal4">=</div>
                            <div class="col-md-3 normal_input">
                                <input type="text" id="ipt5" size="5">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4"></div>
                            <div class="col-md-4 normal_input">
                                <button class="button button-glow button-border button-rounded button-primary"
                                        onclick="go()" id="button1">开始
                                </button>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <!--极速模式-->
            <div id="time_Model">
                <div class="panel panel-default" id="main_panel">
                    <div class="panel-body">
                        <div class="container-fluid">
                            <div class="col-md-3 randnumber" id="randnumber1">
                                ？
                            </div>
                            <div class="col-md-1 fuhao" id="fuhao">
                                +
                            </div>
                            <div class="col-md-3 randnumber" id="randnumber2">
                                ？
                            </div>
                            <div class="col-md-1 fuhao">
                                =
                            </div>
                            <div class="col-md-4 randnumber" id="resultnumber1">
                                <input id="input1">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="panel panel-default" id="daojishi_panel">
                    <div class="panel-body" id="daojishi">
                        倒计时：<span id="daojishi_miao">5</span>&nbsp;秒<br>
                        已做题数：<span id="number_ti">0</span>&nbsp;道&nbsp;&nbsp;正确数：<span id="rightnumber_ti">0</span>道<br>
                        <button id="pauseti" class="btn btn-lg btn-success" onclick="pauseAnswer()">开始答题</button>
                        <button class="btn btn-lg btn-danger" id="endanswer" onclick="endAnswer()">结束答题</button>
                        <button class="btn btn-lg btn-warning" data-toggle="modal" data-target="#helpModal">帮助信息
                        </button>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>

<!-- RegisterModal -->
<div class="modal fade" id="registerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h2 class="modal-title" id="registerModalLabel">注册</h2>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
                    <div class="form-group">
                        <label class="control-label col-sm-3" for="username"><i class="icon-user"></i></label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="newname" placeholder="请输入用户名">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label"><i class="icon-lock"></i></label>

                        <div class="col-sm-9">
                            <input type="password" class="form-control" id="newpassword" placeholder="请输入密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label"><i class="icon-check"></i></label>

                        <div class="col-sm-9">
                            <input type="password" class="form-control" id="rnewpassword" placeholder="密码确认">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <a class="button button-action button-rounded" id="register_btn">注册</a>
            </div>
        </div>
    </div>
</div>

<!-- LoginModal -->
<div class="modal fade" id="LoginModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h2 class="modal-title" id="LoginModalLabel">登录</h2>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
                    <div class="form-group">
                        <label class="control-label col-sm-3" for="username"><i class="icon-user"></i></label>

                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="username" placeholder="请输入用户名">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label"><i class="icon-lock"></i></label>

                        <div class="col-sm-9">
                            <input type="password" class="form-control" id="password" placeholder="请输入密码">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <a class="button button-action button-rounded" id="login_btn">登陆</a>
            </div>
        </div>
    </div>
</div>

<!--warning Modal -->
<div class="modal fade" id="warningModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="warningModalLabel">警告信息</h4>
            </div>
            <div class="modal-body" id="warning">
                检查到您鼠标的焦点已脱离本页面，注意，请不要试图使用windows计算器一类的东西辅助计算。若您当前是做题状态，此题记作错题，
                重新进入页面将重新生成一道题；若未在做题状态，抱歉打扰。
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-warning" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<!--helpModal-->
<div class="modal fade" id="helpModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h1 class="modal-title" id="helpModalLabel">帮助信息</h1>
            </div>
            <div class="modal-body" id="helpinfo">
                当前为极速模式，每次生成一道题，下方有倒计时，在倒计时内算出答案并填写，倒计时为零时会检查答案是否正确并生成下一道题。<br>
                该模式分三种速度，正常（5秒）、慢速（10秒）、超速（3秒），单击开始答题即可开始，中途可临时停止，但暂停后，当前题算作做错了，继续答题时重新生成一道新的。做题过程中不能切换速度和难度，点击结束答题时，未登录用户的做题信息会直
                接展示，登录用户的做题信息会存进数据库
                中保存。结束答题后可重新选择模式，速度，难度。
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<!--message Modal -->
<div class="modal fade" id="messageModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h2 class="modal-title" id="messageModalLabel">提示信息</h2>
            </div>
            <div class="modal-body" id="message">

            </div>
            <span class="sharetext">分享本网站给朋友吧</span>
            <!--分享按钮-->
            <div class="bdsharebuttonbox bdshare-button-style0-16" data-tag="pageSharePreview" data-bd-bind="1444658523591">
                <a class="bds_mshare" data-cmd="mshare"></a>
                <a class="bds_qzone" data-cmd="qzone"></a>
                <a class="bds_tsina" data-cmd="tsina"></a>
                <a class="bds_baidu" data-cmd="baidu"></a>
                <a class="bds_renren" data-cmd="renren"></a>
                <a class="bds_tqq" data-cmd="tqq"></a>
                <a class="bds_more" data-cmd="more">更多</a>
                <a class="bds_count" data-cmd="count"></a>
            </div>
            <script>
                window._bd_share_config = {
                    common : {
                        bdText : '自定义分享内容',
                        bdDesc : '',
                        bdUrl : 'http://math.lihuanyu.com/',
                        bdPic : ''
                    },

                    share : [{
                        "bdSize" : 16
                    }],
                    image : [{
                        viewType : 'list',
                        viewPos : 'top',
                        viewColor : 'black',
                        viewSize : '16',
                        viewList : ['qzone','tsina','huaban','tqq','renren']
                    }],
                    selectShare : [{
                        "bdselectMiniList" : ['qzone','tqq','kaixin001','bdxc','tqf']
                    }]
                }
                with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
            </script>
            <div class="modal-footer">
                <button type="button" class="btn btn-warning" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<!--about Modal -->
<div class="modal fade" id="aboutModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h1 class="modal-title" id="aboutModalLabel">关于</h1>
            </div>
            <div class="modal-body" id="about">
                <p>
                    本网站由风向标团队制作，目的是辅助提升小学生数学的口算速算心算能力。相比于传统的口算速算心算练习册，使用我们的网站可大幅度减轻家长的工作量，无需在孩子做完题后一道道对照答案检查，网站会统计做题量及正确率。</br>
                    对于已经登录的用户，做题记录会存在数据库中，方便随时查看。网站使用简单，登录或进入直接答题即可。<br>分两种模式为极速模式和普通模式，极速模式分正常速，慢速和超速，分别是5秒一次判题，10秒一次判题，3秒一次判题，普通模式则是一页5道题，可以选择相应的页数。难度涵盖小学一至四年级，一年级是只有加减法，十位数加减个位数，二年级加入了乘法，9*9范围内的，三年级加入了除法，四年级扩大了数字的范围。<br>家长须知:请收起家中的计算器（包括手机），我们的网站可以防止孩子通过用windows计算器或者其他网络计算器作弊,但对于实体计算器毫无办法。
                </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-warning" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<!--chart modal-->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" id="chart">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" align="center">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <div style="width: 800px">
                <h2>成绩曲线图</h2>
                <hr>
                <div>
                    <canvas id="canvas" height="100" width="200"></canvas>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<!-- 版权信息  -->
<footer id="copyright" data-toggle="modal" data-target="#myModal">&copy; 风向标团队 2015 . All rights reserved.</footer>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h1 class="modal-title" id="myModalLabel">
                    版权说明
                </h1>
            </div>
            <div class="modal-body" id="banquan">
                本程序是使用HTML5技术开发的小学数学题练习网站。采用BSD协议分发，如果你以任何方式使用了本软件，就代表了你接受了此协议。软件著作权归风向标团队所有。
                <h2>中文版</h2>
                <h5>Copyright (c) 2015 著作权由风向标团队所有。著作权人保留一切权利。</h5>

                这份授权条款，在使用者符合以下三条件的情形下，授予使用者使用及再散播本
                软件包装原始码及二进位可执行形式的权利，无论此包装是否经改作皆然：
                对于本软件源代码的再散播，必须保留上述的版权宣告、此三条件表列，以
                及下述的免责声明。
                对于本套件二进位可执行形式的再散播，必须连带以文件以及／或者其他附
                于散播包装中的媒介方式，重制上述之版权宣告、此三条件表列，以及下述
                的免责声明。
                未获事前取得书面许可，不得以任何形式使用本软件贡献者之名称，
                来为本软件之衍生物做任何表示支持、认可或推广、促销之行为。
                <h3>免责声明</h3>
                本软件是由风向标团队提供，
                本软件包装不负任何明示或默示之担保责任，包括但不限于就适售性以及特定目
                的的适用性为默示性担保。风向标团队，无论任何条件、
                无论成因或任何责任主义、无论此责任为因合约关系、无过失责任主义或因非违
                约之侵权（包括过失或其他原因等）而起，对于任何因使用本软件包装所产生的
                任何直接性、间接性、偶发性、特殊性、惩罚性或任何结果的损害（包括但不限
                于替代商品或劳务之购用、使用损失、资料损失、利益损失、业务中断等等），
                不负任何责任，即在该种使用已获事前告知可能会造成此类损害的情形下亦然。
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default"
                        data-dismiss="modal">关闭
                </button>
            </div>
        </div>
    </div>
</div>

<script src="js/vendor/jquery.min.js"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/vendor/bootstrap-select.min.js"></script>
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery.min.js"><\/script>')</script>
<!-- build:remove -->
<script src="js/Chart.js"></script>
<script src="js/ajax.js"></script>
<script src="js/plugins.js"></script>
<script src="js/Modernizr.js"></script>
<script src="js/main.js"></script>
<!-- /build -->
<!-- /build -->
<script type="text/javascript" src="./js/application.js"></script> 
</body>
</html>